home *** CD-ROM | disk | FTP | other *** search
Wrap
mmmmlllloooocccckkkkaaaallllllll((((3333CCCC)))) mmmmlllloooocccckkkkaaaallllllll((((3333CCCC)))) NNNNAAAAMMMMEEEE _mmmm_llll_oooo_cccc_kkkk_aaaa_llll_llll, _mmmm_uuuu_nnnn_llll_oooo_cccc_kkkk_aaaa_llll_llll - lock or unlock address space SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_mmmm_mmmm_aaaa_nnnn_...._hhhh_>>>> _iiii_nnnn_tttt _mmmm_llll_oooo_cccc_kkkk_aaaa_llll_llll_((((_iiii_nnnn_tttt _f_l_a_g_s_))))_;;;; _iiii_nnnn_tttt _mmmm_uuuu_nnnn_llll_oooo_cccc_kkkk_aaaa_llll_llll_((((_vvvv_oooo_iiii_dddd_))))_;;;; DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN _mmmm_llll_oooo_cccc_kkkk_aaaa_llll_llll locks all pages mapped in the address space of the calling process into memory, including: text, data, stack and mmaped regions. Locked pages are immune to all routine swapping. The value of _f_l_a_g_s determines whether the pages to be locked are those currently mapped by the address space, those that will be mapped in the future, or both: _MMMM_CCCC_LLLL______CCCC_UUUU_RRRR_RRRR_EEEE_NNNN_TTTT Lock current mappings _MMMM_CCCC_LLLL______FFFF_UUUU_TTTT_UUUU_RRRR_EEEE Lock future mappings _mmmm_uuuu_nnnn_llll_oooo_cccc_kkkk_aaaa_llll_llll unlocks all memory mapped pages in the address space of the calling process, regardless of the number of times the pages were locked. Automatic memory locking of future memory mappings is disabled for the process. Locks established with _mmmm_llll_oooo_cccc_kkkk_aaaa_llll_llll are not inherited by a child process after a _ffff_oooo_rrrr_kkkk. If the address space contains autogrow regions [see _mmmm_mmmm_aaaa_pppp(2)], _mmmm_llll_oooo_cccc_kkkk_aaaa_llll_llll will only cause the pages through the current end of file to be locked down. In the event automatic memory locking of future mappings is enabled for a process (_MMMM_CCCC_LLLL______FFFF_UUUU_TTTT_UUUU_RRRR_EEEE), and the locked memory of that process stack space exceeds either the system's physical memory or the maximum amount of lockable pages per process as determined by the system variable _mmmm_aaaa_xxxx_llll_kkkk_mmmm_eeee_mmmm, the process will receive a _SSSS_IIII_GGGG_SSSS_EEEE_GGGG_VVVV with a signal code of _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM [see _ssss_iiii_gggg_aaaa_cccc_tttt_iiii_oooo_nnnn(2) and _ssss_iiii_gggg_nnnn_aaaa_llll(5)]. If the locked memory of the process heap space exceeds either the system's physical memory or the maximum amount of lockable pages per process _mmmm_aaaa_xxxx_llll_kkkk_mmmm_eeee_mmmm, the system call which attempts the expansion will fail without making a change to the amount of allocated space, and _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM. _mmmm_llll_oooo_cccc_kkkk_aaaa_llll_llll or _mmmm_uuuu_nnnn_llll_oooo_cccc_kkkk_aaaa_llll_llll will fail if one or more of the following are true: [EAGAIN] There was insufficient lockable memory to lock the entire address space. This may occur even though the amount requested was less than the system-imposed maximum number of locked pages. PPPPaaaaggggeeee 1111 mmmmlllloooocccckkkkaaaallllllll((((3333CCCC)))) mmmmlllloooocccckkkkaaaallllllll((((3333CCCC)))) [EBUSY] _mmmm_uuuu_nnnn_llll_oooo_cccc_kkkk_aaaa_llll_llll will fail with this error if a region of the address space has some active I/O initiated by some other process belonging to same share group. [EINVAL] The _f_l_a_g_s argument is zero or contains invalid flags. [ENOMEM] The caller was not super-user and the number of pages to be locked exceeded the maximum number of lockable pages per process as defined by the system variable _m_a_x_l_k_m_e_m [see _ssss_yyyy_ssss_tttt_uuuu_nnnn_eeee(1M)]. [ENOMEM] The total number of pages locked by the caller would exceed the maximum resident size for the process [see _ssss_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt(2)]. [ENOSPC] The address space of the calling process contains a memory- mapped file, and there is insufficient space on the device to allocate the entire file. SSSSEEEEEEEE AAAALLLLSSSSOOOO exec(2), exit(2), fork(2), mmap(2), mlock(3C), munlock(3C), mpin(2), munpin(2), plock(2), sigaction(2), sysconf(3C) DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS Upon successful completion, the functions _mmmm_llll_oooo_cccc_kkkk_aaaa_llll_llll and _mmmm_uuuu_nnnn_llll_oooo_cccc_kkkk_aaaa_llll_llll return 0, otherwise, they return -1 and set _eeee_rrrr_rrrr_nnnn_oooo to indicate the error. WWWWAAAARRRRNNNNIIIINNNNGGGG The _mmmm_llll_oooo_cccc_kkkk_aaaa_llll_llll_////_mmmm_uuuu_nnnn_llll_oooo_cccc_kkkk_aaaa_llll_llll pair and the _pppp_llll_oooo_cccc_kkkk function provide similar functionality. Developers should choose the set that best suites their application and stick with it, as mixing the interfaces may result in unexpected behavior. PPPPaaaaggggeeee 2222